package com.april.pattern.structural.decorate;

import org.junit.jupiter.api.Test;

/**
 * @author April
 * @version V1.0.0
 * @date 2019/07/04 11:50
 * @description
 */
public class DecorateTest {
    @Test
    public void decorateTest() {
        AbstractPancake pancake;
        pancake = new Pancake();
        pancake = new EggDecorator(pancake);
        pancake = new SausageDecorator(pancake);

        System.out.println(pancake.getDecoration() + " 价格是：" + pancake.getPrice());
    }
}
